from django.contrib import admin
from .models import Information


# Register your models here.

@admin.register(Information)
class InformationAdmin(admin.ModelAdmin):
    list_display = ['type']
    readonly_fields = ['type']
    ordering = ['id']

    def has_add_permission(self, request):
        # 禁用添加按钮
        return False

    def has_delete_permission(self, request, obj=None):
        # 禁用删除按钮
        return False


admin.site.site_title = 'NSI软件协会官网—后台管理'
admin.site.site_header = 'NSI软件协会官网—后台管理'
